package com.itheima.edu.info.manager.entry;

import com.itheima.edu.info.manager.controller.StudentController;
import com.itheima.edu.info.manager.thread.SocketRunnable;

import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;
import java.util.Scanner;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

//项目的启动引擎类：未来整个项目的启动入口就放在这个类里
public class ServiceEntry {

    public static void main(String[] args) throws IOException {
        ServerSocket ss = new ServerSocket(10000);
        ExecutorService pool = Executors.newFixedThreadPool(10);
        while (true) {
            Socket socket = ss.accept();
            SocketRunnable sr = new SocketRunnable(socket);
            pool.submit(sr);

        }
    }
}
